package cn.iocoder.yudao.module.trade.controller.admin.order.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import java.math.BigDecimal;
import lombok.Data;

/**
 * 交易订单项 Base VO，提供给添加、修改、详细的子 VO 使用
 * 如果子 VO 存在差异的字段，请不要添加到这里，影响 Swagger 文档生成
 */
@Data
public class TradeOrderItemBaseVO {

    // ========== 订单项基本信息 ==========

    @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    private Long id;

    @Schema(description = "用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    private Long userId;

    @Schema(description = "订单编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    private Long orderId;

    // ========== 商品基本信息 ==========

    @Schema(description = "商品 SPU 编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    private Long spuId;

    @Schema(description = "商品 SPU 名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道源码")
    private String spuName;

    @Schema(description = "商品 SKU 编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    private Long skuId;

    @Schema(description = "商品 SKU 名称", example = "1")
    private String skuName;

    @Schema(description = "商品图片", requiredMode = Schema.RequiredMode.REQUIRED, example = "https://www.iocoder.cn/1.png")
    private String picUrl;

    @Schema(description = "购买数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    private Integer count;

    // ========== 价格 + 支付基本信息 ==========

    @Schema(description = "商品原价（单）", requiredMode = Schema.RequiredMode.REQUIRED, example = "100")
    private Integer price;

    @Schema(description = "商品优惠（总）", requiredMode = Schema.RequiredMode.REQUIRED, example = "100")
    private Integer discountPrice;

    @Schema(description = "商品实付金额（总）", requiredMode = Schema.RequiredMode.REQUIRED, example = "100")
    private Integer payPrice;

    @Schema(description = "子订单分摊金额（总）", requiredMode = Schema.RequiredMode.REQUIRED, example = "100")
    private Integer orderPartPrice;

    @Schema(description = "分摊后子订单实付金额（总）", requiredMode = Schema.RequiredMode.REQUIRED, example = "100")
    private Integer orderDividePrice;

    // ========== 营销基本信息 ==========

    // TODO 芋艿：在捉摸一下

    // ========== 售后基本信息 ==========

    @Schema(description = "售后状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    private Integer afterSaleStatus;

    // ========== 虚拟商品相关字段 ==========

    /**
     * 是否自定义面值
     */
    @Schema(description = "是否自定义面值", example = "false")
    private Boolean customDenomination;
    /**
     * 面值
     */
    @Schema(description = "面值", example = "100")
    private Integer nominalValue;
    /**
     * 充值账号
     */
    @Schema(description = "充值账号", example = "88888888")
    private String rechargeAccount;
    /**
     * 充值密码
     */
    @Schema(description = "充值密码", example = "XXXXXX")
    private String rechargePassword;
    /**
     * 充值游戏
     */
    @Schema(description = "充值游戏", example = "steam")
    private String rechargeGame;
    /**
     * 充值区
     */
    @Schema(description = "充值区", example = "Asia")
    private String rechargeArea;
    /**
     * 充值服
     */
    @Schema(description = "充值服", example = "China1")
    private String rechargeServer;
    /**
     * 计费方式
     */
    @Schema(description = "计费方式", example = "100")
    private String billingMethod;
    /**
     * 游戏角色
     */
    @Schema(description = "游戏角色", example = "User")
    private String gameRole;
    /**
     * 联系电话
     */
    @Schema(description = "联系电话", example = "18866668888")
    private String contactPhone;
    /**
     * 联系 QQ
     */
    @Schema(description = "联系 QQ", example = "888888")
    private String contactQq;
    /**
     * 接收邮箱
     */
    @Schema(description = "接收邮箱", example = "888888@qq.com")
    private String receiveEmail;
    /**
     * 币种
     */
    @Schema(description = "币种", example = "CNY")
    private String currencyCode;
    /**
     * 汇率
     */
    @Schema(description = "币种", example = "7.2")
    private BigDecimal exchangeRate;
    /**
     * 充值方式：直充/卡密
     */
    @Schema(description = "充值方式：直充/卡密", example = "1")
    private Integer rechargeMethod;
    /**
     * 发货方式：自动/手动
     */
    @Schema(description = "发货方式：自动/手动", example = "1")
    private Integer deliveryMethod;

    /**
     * 面值
     */
    @Schema(description = "面值", example = "8.4U GET 5USD")
    private String denomination;

    @Schema(description = "调用支付时价格（总），单位：分", example = "10000")
    private Integer paymentPrice;

    /**
     * 卡密商品编号
     */
    @Schema(description = "卡密商品编号", example = "XXX")
    private String cardKeyProductNo;

    // ========== 新增eSim SKU 相关字段 =========

    /**
     * eSim流量大小
     */
    @Schema(description = "卡密商品编号", example = "5")
    private Integer esDataAllowanceMb;

    /**
     * eSim有效期
     */
    @Schema(description = "卡密商品编号", example = "5")
    private Integer esValidityPeriodDays;

    /**
     * eSim商品id
     */
    @Schema(description = "卡密商品编号", example = "111")
    private String esProductId;

    /**
     * 面值
     */
    @Schema(description = "商品面额(自定义面额=price*nominalValue)", example = "100")
    private Integer itemNominalValue;


}
